<?php
/**
 * Html Helper class file.
 *
 * Simplifies the construction of HTML elements.
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake.libs.view.helpers
 * @since         CakePHP(tm) v 0.9.1
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

App::import('Helper', 'Html');
App::import('Vendor', 'editor/fckeditor');
class EditorHelper extends HtmlHelper {
    public function loadEditor($texteare_name, $value = '', $width = 750, $height = 600)
    {
        $oFCKeditor = new FCKeditor($texteare_name) ;
        $oFCKeditor->BasePath	=  Configure::read('baseUrl') . '/js/fckeditor/' ;
        $oFCKeditor->Value      =  $value;
        $oFCKeditor->Width	=  $width;
        $oFCKeditor->Height	=  $height;        
        $oFCKeditor->Create() ;
    }
}
